package com.xinqi.modules.course.course.enums.student;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.xinqi.common.base.enums.BaseEnum;
import lombok.Getter;

/**
 * 学生归档状态表
 *
 * @author wenjie
 * @date 2023/3/8  17:36
 */
public enum StudentArchiveStatusEnum {
    NOT_ARCHIVE("NOT_ARCHIVE", "未归档"),

    ARCHIVE("ARCHIVE", "归档");

    @Getter(onMethod_ = {@JsonValue})
    private final String code;

    @Getter
    private final String describe;

    StudentArchiveStatusEnum(String code, String describe) {
        this.code = code;
        this.describe = describe;
    }

    @JsonCreator
    public static StudentArchiveStatusEnum of(String code) {
        return BaseEnum.of(StudentArchiveStatusEnum.class, code);
    }
}
